How to run HTML script for two tabels